

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>


<%-- Importa las tag libraries necesarias --%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>




<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>

        <H1>Consulta de Alumnos</H1>
        <hr noshade color="#0000FF" size="3"><BR> <br>

        <html:form action="ProcesarConsulta">
            Id: <html:text property="alumnoId" value="" />
            Nombre: <html:text property="nombre" value="" />
            Apellido <html:text property="apellido" value="" />
            <html:submit  value="Buscar" />  
            <html:errors />
        </html:form>

        <html:link forward="irAlta">[ir a ventana Insertar]</html:link>

        <hr noshade color="#0000FF" size="1"><br>

        <table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
            <tr>
                <td width="5%" bgcolor="#0000FF"><b><font color="#FFFFFF">#</font></b</td>
                <td width="5%" bgcolor="#0000FF"><b><font color="#FFFFFF">ID</font></b></td>
                <td width="30%" bgcolor="#0000FF"><b><font color="#FFFFFF">NOMBRE</font></b></td>
                <td width="30%" bgcolor="#0000FF"><b><font color="#FFFFFF">APELLIDO</font></b></td>
                <td width="30%" bgcolor="#0000FF"><b><font color="#FFFFFF">ADMIN</font></b></td>
            </tr>

            <c:forEach var="e" items="${requestScope.arrayAlumnos}" varStatus="contador" >

                <tr>
                    <td width="5%" >${contador.count}</td>
                    <td width="5%" >${e.alumnoId}</td>
                    <td width="30%" >${e.nombre}</td>
                    <td width="30%" >${e.apellido}</td>
                    <td width="30%">
                        <html:link action="ProcesarModi?alumnoId=${e.alumnoId}&apellido=${e.apellido}&nombre=${e.nombre}" >modificar</html:link>
                        |
                        <html:link action="Eliminar?alumnoId=${e.alumnoId}&apellido=${e.apellido}" >Eliminar</html:link>
                    </td>
                </tr>
            </c:forEach>


        </table>
        <P align=left>
            <B>${cantidad} </B> alumnos encontrado(s)
        </P>

        <B>${mensaje}</B>

    </body>
</html>
